//
//  ButtonCell.m
//  BeautyClother
//
//  Created by dllo on 15/9/16.
//  Copyright (c) 2015年 宋爽. All rights reserved.
//

#import "ButtonCell.h"
#import "ImageWithLabel.h"
@implementation ButtonCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.brand = [[ImageWithLabel alloc] init];
        [self.contentView addSubview:_brand];
        [_brand release];
        
        self.put = [[ImageWithLabel alloc] init];
        [self.contentView addSubview:_put];
        [_put release];
        
        self.beauty = [[ImageWithLabel alloc] init];
        [self.contentView addSubview:_beauty];
        [_beauty release];
        
        self.fashion = [[ImageWithLabel alloc] init];
        [self.contentView addSubview:_fashion];
        [_fashion release];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    CGFloat offwidth = [UIScreen mainScreen].bounds.size.width / 375;
    CGFloat offheight = [UIScreen mainScreen].bounds.size.height / 667;
    
    self.brand.frame = CGRectMake(10, 5, 60 * offwidth, 80 * offheight);
    
    self.put.frame = CGRectMake(90 * offwidth + 10, 5, 60 * offwidth, 80 * offheight);
    
    
    self.beauty.frame = CGRectMake(90 * 2 * offwidth + 10, 5, 60 * offwidth, 80 * offheight);
    
    self.fashion.frame = CGRectMake(90 * 3 * offwidth + 10, 5, 60 * offwidth, 80 * offheight);
    
        
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
